﻿using System.Collections.Generic;
using System.ServiceModel;
using Pku.BookStore.Model;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "IPublisherServices", Namespace = "Pku.BookStore.IServices")]
    public interface IPublisherServices
    {
        /// <summary>
        /// 增加出版社
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(PublisherModel entity);

        /// <summary>
        /// 修改出版社信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(PublisherModel entity);

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<PublisherModel> Search(PublisherParam param);

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="publisherID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        PublisherModel GetEntityById(int publisherID);

        /// <summary>
        /// 是否存在
        /// </summary>
        /// <param name="Str">关键字</param>
        /// <returns></returns>
        [OperationContract(Name = "Exist")]
        bool Exist(string Str);

        /// <summary>
        /// 获取总数
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetCount")]
        int GetCount(Model.PublisherParam param);

         /// <summary>
        /// 删除
        /// </summary>
        /// <param name="CategoryID"></param>
        /// <returns></returns>
        [OperationContract(Name = "Delete")]
        bool Delete(int PublisherID);

    }
}
